package net.sourceforge.peertwitter.mbpast.messaging;

import net.sourceforge.peertwitter.mbpast.Replication;
import rice.p2p.commonapi.NodeHandle;

public class ReplicaRequestAck extends MBPastMessageTemplate {

	private static final long serialVersionUID = 8806228768564236678L;

	private final Replication replication;

	private final int uniqueId;

	public ReplicaRequestAck(NodeHandle sender, Replication replication, ReplicaRequest rr) {
		super(sender);
		this.replication = replication;
		this.uniqueId = rr.getUniqueId();
	}

	@Override
	public int getPriority() {
		return MEDIUM_HIGH_PRIORITY;
	}

	public Replication getReplication() {
		return replication;
	}

	@Override
	public String toString() {
		return "ReplicaRequestAck [sender=" + this.getSender() + ", replication="
				+ replication + "]";
	}


	public int getUniqueId() {
		return uniqueId;
	}


}
